home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr27
/
nowthn11.zip
/
NOW&THEN.DOC
< prev
next >
Wrap
Text File
|
1995-02-25
|
16KB
|
443 lines
Now & Then
Version 1.1
──────────────────────────────────────
Copyright 1995 by Computer Solutions
All Rights Reserved
P R O G R A M D O C U M E N T A T I O N
(For a quick summary of options, type NOW&THEN at the dos prompt.)
┌───────────────────╖
──┤ About The Program ╟───────────────────────────────────────────────────────
╘═══════════════════╝
"Now & Then" is a small program which will execute a DOS command or program
one time during a user defined period of time, which is measured in days.
Now & Then was created because of my desire for perfection (not that this
program claims to be perfect). The commercial utility I was using lacked the
flexibility I needed. This sent me on a search of a similar utility on the net
and on local bulletin boards. I found half-a-dozen possibilities, but none of
those were flexible enough either. So I decided to write my own.
While writing Now & Then, I tried to keep other users in mind as well. Program
functionality and flexibility is the most important aspect, second only to ease
of use. This documentation alone proves that I kept the rest of the world in
mind. I can not believe I am the only person who needs such functionality.
Many of the programs I found have various limitations with the data file. Some
require the data file to reside in the root directory. Others require the data
file to reside in the same directory as the program itself.
These programs also have limitations with the commands they can execute. Some
programs require that the commands are contained in a specific BAT file in a
specific location. Some programs limit the number of options the user can pass
with the command. Some programs only allow one command executed per day.
Other programs have a slew of required command line parameters.
I wanted a program with few or no limitations, and Now & Then is the result.
┌──────────────────╖
──┤ How It Works ╟────────────────────────────────────────────────────────
╘══════════════════╝
Now & Then creates a data file which keeps up with the date each command was
last executed. The entire command line is kept for each command, including all
options. This allows the user to execute the same program with different
options on different days.
By allowing the user to specify which data file to use, Now & Then is able to
keep track of the same set of commands for different purposes. For example, my
office has five networked computers. Now & Then resides on our server and is
used to perform daily maintenance for each machine. The same set of commands
runs on each machine, therefore the need for each machine to have a separate
data file.
There is a minor DOS limitation which affects Now & Then. DOS makes a copy
of the environment for each program executed. Unfortunately, there is no DOS
supported and documented method of accessing the parent environment. The
command that Now & Then executes has its own environment, which is deleted when
the command is completed. Therefore, if the command alters the environment
(such as a SET or PATH command), it will not alter the master environment. A
command such as NOW&THEN 1 SET FIRSTBOOT=TRUE would not have an effect, and
FIRSTBOOT would not be set. This is DOS's behavior and is beyond my control.
I added ERRORLEVEL support to version 1.1 of Now & Then. This allows a batch
file to determine if the command was scheduled to run. If the command was
scheduled, then the batch file can run the command directly. This solves the
problem with the NOW&THEN 1 SET FIRSTBOOT=TRUE example above. There are BAT
files included which illustrate how to check the ERRORLEVEL value in DOS.
February, 1995 Now & Then Page 1
┌─────────────────────╖
──┤ Command Line Syntax ╟─────────────────────────────────────────────────────
╘═════════════════════╝
Syntax:
NOW&THEN [options] interval-in-days command
[options]
Options allow the user to customize various settings.
interval-in-days
This specifies the frequency which the command should be executed.
command
This specifies the command which to execute. Now & Then supports
commands up to 255 characters in length. Note, however, that most
versions of DOS only allow a command line of 127 characters. The 4DOS
COMMAND.COM replacement is one of the exceptions.
The user may pass an infinite number of parameters with the command.
However, if parameters beginning with "-" or "/" are passed to the
command, the entire command must be enclosed in quotations. This is
required because of the way Now & Then parses its own parameters.
Without the quotations, Now & Then thinks the parameters were meant
for it, not for the command.
February, 1995 Now & Then Page 2
┌──────────────────────╖
──┤ Command Line Options ╟────────────────────────────────────────────────────
╘══════════════════════╝
∙ may be specified in any order
∙ may be upper or lower case
∙ must be preceded by a slash (/) or a minus (-)
∙ must be separated by a space ( )
/? (Help)
Displays a usage screen.
/q (Quite Mode)
Normally the program displays informational output telling the user
if the command was executed or not. This option suppresses that
informational output. Combined with the >NUL redirection (see below),
this will completely disable output from most programs.
/a (Always)
Performs the command even if it is not scheduled for today. By default,
this switch updates the data file to indicate that the command was
executed today.
/n (Nothing)
Don't actually perform the command. When used in conjunction with the
ERRORLEVEL value, this switch allows a .BAT file to determine if the
command should be executed, without actually performing the command.
This is very useful with the SET FIRSTBOOT=1 example explained in
"How It Works." When used in conjunction with the update switch (/u),
the /n switch may also be used for testing purposes, to determine if the
command is scheduled to run or not. Idea taken from 4DOS, and has since
been very useful.
/u (Update)
Don't update the data file. If the command is scheduled to execute, the
data file is normally updated so the command will not run until it is
scheduled to run again. This option prevents the data file update.
/f=file.ext (Data file name)
Specify the name of the date file to use. The user can specify the
entire path of the file and the extension. If a path is not specified,
the current directory is used. If an extension is not specified, .DAY
is used. If this option is omitted, a data file will be created in the
same directory as the Now & Then executable.
>NUL (Output Redirection)
This is actually part of DOS, but it is quite handy when used in
conjunction with Now & Then. DOS will suppress program output when >NUL
is placed at the end of the command. When used in conjunction with the
Quiet switch (/q), this will usually suppress the output of the command.
Note that some programs write directly to video, bypassing the BIOS.
>NUL does not suppress the output of such programs.
February, 1995 Now & Then Page 3
┌────────────────────╖
──┤ Included Utilities ╟──────────────────────────────────────────────────────
╘════════════════════╝
Included is a utility named LISTDATA, which reads a Now & Then data file and
prints each command stored in the data file, as well as the date the command
was last executed.
There is no great use for such a utility. However, it took all of ten seconds
to cut and paste the code from Now & Then into a new window and compile it into
a separate program.
The syntax for LISTDATA is: LISTDATA filename, where filename is the name of
the Now & Then data file.
┌──────────────────╖
──┤ Thank You List ╟────────────────────────────────────────────────────────
╘══════════════════╝
The following shareware authors deserve much thanks for their work. I have
taken ideas from their programs and documentation for use in Now & Then.
Program Ideas
Gene Allison, author of ONCEADAY Joseph Sheppard, author of DayBat
Stephen Baines, author of Once Only William Waldrop, author of Once-A
Samuel Kaplin, author of Interval
Documentation Ideas
Chris S. Craig, author of ScopeTrax Andy Hakim, author of NoHiss
Nicola Ferioli, author of VocPack Tom Rathborne, author of ModUtils
The following people have contacted me about Now & Then. Very few people send
mail to FreeWare/ShareWare authors. I feel appreciated when someone sends me
mail, and I like to thank them for it.
Program Suggestions
Niels Ull Jacobsen requested the always switch (/a).
Bug Reports
Jim Gorges informed me that the program did not support 8088 machines.
My in-house projects are compiled with 286 code, and I did not think
about changing the compiler options for Now&Then.
I would also like to thank the following people for reviewing this
documentation before its release:
Aimee Richards, the love of my life and co-owner of Computer Solutions.
Gary Fambrough, Charlie Rowland, and Alyce Hardee, my co-workers at
High Q Incorporated.
February, 1995 Now & Then Page 4
┌──────────────────╖
──┤ Future Additions ╟────────────────────────────────────────────────────────
╘══════════════════╝
This program does everything I need it to do, and then some. However, there
is always room for improvement. Please contact me if you would like to see a
particular feature added. I released the first version on January 11, 1995.
Due to user response, I released a second version on February 22, 1995.
Planned additions:
Command line examples provided in this documentation.
Implement the functionality of LISTDATA directly in Now & Then.
The ability to specify once a month, week, or year, followed by a day
of week or date specification. These features are in the Once-A utility
written by William Waldrop.
┌──────────────────╖
──┤ Revision History ╟────────────────────────────────────────────────────────
╘══════════════════╝
1.0 01/11/95 First release.
1.01 02/13/95 Recompiled to support 8088 machines. Thanks to Jim Gorges
for this one. This revision was sent to Jim only.
1.10 02/23/95 Broke down and wrote a new release. Features included in this
release are:
Added the always switch (/a) at Niels Ull Jacobsen's request.
Added the ability to determine if a command was scheduled to
run based on DOS's ERRORLEVEL value.
Added error message when wrong number of arguments were used.
Previously I displayed the usage screen, which failed to
explain why the command didn't work.
Added the LISTDATA utility to list the contents of a
Now & Then data file.
Modified the /n switch so that it does update the file. This
was primarily to facilitate the new ERRORLEVEL support. If
the user needs the previous functionality of /n, use /u in
combination with /n.
Rewrote most of this documentation.
February, 1995 Now & Then Page 5
┌──────────────────╖
──┤ About The Author ╟────────────────────────────────────────────────────────
╘══════════════════╝
Computer Solutions is a small, computer consulting firm which Aimee & I
started in the Summer of 1994. Feel free to contact us with any ideas,
comments, suggestions, or questions you may have.
US Mail │ Computer Solutions
│ 12111 West Markham Suite 14-121
│ Little Rock, AR 72211
│
Pager │ (501) 660-9787
│
Electronic Mail │ jon.robertson@grapevine.lrk.ar.us
│
Bulletin Board │ Ferret Face
│ (501) 791-0124
│ 2400/14400/28800 baud, HST/v.32/v.FC
│ Username: Jon Robertson
┌──────────────────╖
──┤ Legal Talk ╟────────────────────────────────────────────────────────
╘══════════════════╝
This program is FreeWare. Individuals are granted the right to freely use
Now & Then without any concern for registration. Corporate users must contact
me for a site license agreement.
While this program works great with the six machines I've used, I can not
guarantee that it will work on every system. Therefore, this program carries
no warranties, expressed or implied. If you have a problem, please contact me.
You may freely distribute Now & Then to others as long as:
∙ Only the original files are distributed
∙ No changes are made to any of the files
∙ No money is charged for the program
Now & Then may be freely included on any form of compilation disk or
shareware library, except disks or libraries that charge *per program*,
rather than per disk of programs.
This program is not crippled in any way and does not contain any 'nag'
messages. In fact, if the right options are specified, nothing is ever
displayed on the screen.
Now & Then and this documentation are Copyright 1995 by Computer Solutions,
All Rights Reserved. The author of this program is not liable for any damage
caused by its use. By using this program, you agree to the above conditions.
February, 1995 Now & Then Page 6